import { NgModule, LOCALE_ID } from '@angular/core';
import { DatePipe, registerLocaleData } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { Title } from '@angular/platform-browser';
<%_ const localeId = getLocaleId(nativeLanguage); _%>
import locale from '@angular/common/locales/<%= localeId %>';

<%_ if (enableI18nRTL) { _%>
import {
    FindLanguageFromKeyPipe
} from 'app/shared/language/find-language-from-key.pipe';
<%_ } _%>
import { NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap';
import { NgbDateMomentAdapter } from 'app/shared/util/datepicker-adapter';

@NgModule({
    imports: [
        HttpClientModule
    ],
    exports: [],
    declarations: [],
    providers: [
        Title,
        {
            provide: LOCALE_ID,
        <%_ if (skipLanguageForLocale(nativeLanguage)) { _%>
            useValue: 'en'
        <%_ } else { _%>
            useValue: '<%= localeId %>'
        <%_ } _%>
        },
        { provide: NgbDateAdapter, useClass: NgbDateMomentAdapter},
        <%_ if (enableI18nRTL) { _%>
        FindLanguageFromKeyPipe,
        <%_ } _%>
        DatePipe
    ]
})
export class <%=angularXAppName%>CoreModule {
    constructor() {
        registerLocaleData(locale);
    }
}
